monopoly go dice monopoly go dice monopoly go dice monopoly go dice
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <queue> | |
#include <unordered_map> | |
using namespace std; | |
// A Tree node | |
struct Node | |
{ | |
char ch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import traceback | |
class DontRaiseUntilDone: | |
def __init__(self): | |
self.exceptions = [] | |
def __enter__(self): | |
return self | |
def __exit__(self, exc_type, exc_val, exc_tb): |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 14, | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [80, 120], | |
"extensions.ignoreRecommendations": true, | |
"typescript.tsserver.log": "off", | |
"files.associations": { |
Comando con Ruby instalado
ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'
Ejemplo: No usar en producción
4510c8cf2fe423f8be5afccbdd30c678677e172b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $Id: hash.mqh 125 2014-03-03 08:38:32Z ydrol $ | |
#ifndef YDROL_HASH_MQH | |
#define YDROL_HASH_MQH | |
//#property strict | |
/* | |
This is losely ported from a C version I have which was in turn modified from hashtable.c by Christopher Clark. | |
Copyright (C) 2014, Andrew Lord (NICKNAME=lordy) <forex@NICKNAME.org.uk> | |
Copyright (C) 2002, 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk> |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
NewerOlder